Optimal. Leaf size=122 \[ -\frac{a^3 (A-5 i B)}{3 c^5 f (\tan (e+f x)+i)^3}+\frac{a^3 (2 B+i A)}{c^5 f (\tan (e+f x)+i)^4}+\frac{4 a^3 (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}-\frac{a^3 B}{2 c^5 f (\tan (e+f x)+i)^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.175211, antiderivative size = 122, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 41, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.049, Rules used = {3588, 77} \[ -\frac{a^3 (A-5 i B)}{3 c^5 f (\tan (e+f x)+i)^3}+\frac{a^3 (2 B+i A)}{c^5 f (\tan (e+f x)+i)^4}+\frac{4 a^3 (A-i B)}{5 c^5 f (\tan (e+f x)+i)^5}-\frac{a^3 B}{2 c^5 f (\tan (e+f x)+i)^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3588
Rule 77
Rubi steps
\begin{align*} \int \frac{(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{(c-i c \tan (e+f x))^5} \, dx &=\frac{(a c) \operatorname{Subst}\left (\int \frac{(a+i a x)^2 (A+B x)}{(c-i c x)^6} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{(a c) \operatorname{Subst}\left (\int \left (-\frac{4 a^2 (A-i B)}{c^6 (i+x)^6}-\frac{4 i a^2 (A-2 i B)}{c^6 (i+x)^5}+\frac{a^2 (A-5 i B)}{c^6 (i+x)^4}+\frac{a^2 B}{c^6 (i+x)^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac{4 a^3 (A-i B)}{5 c^5 f (i+\tan (e+f x))^5}+\frac{a^3 (i A+2 B)}{c^5 f (i+\tan (e+f x))^4}-\frac{a^3 (A-5 i B)}{3 c^5 f (i+\tan (e+f x))^3}-\frac{a^3 B}{2 c^5 f (i+\tan (e+f x))^2}\\ \end{align*}
Mathematica [A] time = 3.91606, size = 91, normalized size = 0.75 \[ \frac{a^3 (\cos (8 e+11 f x)+i \sin (8 e+11 f x)) (-4 (A+4 i B) \sin (2 (e+f x))+4 (B-4 i A) \cos (2 (e+f x))-15 i A)}{240 c^5 f (\cos (f x)+i \sin (f x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.052, size = 87, normalized size = 0.7 \begin{align*}{\frac{{a}^{3}}{f{c}^{5}} \left ( -{\frac{-4\,iA-8\,B}{4\, \left ( \tan \left ( fx+e \right ) +i \right ) ^{4}}}-{\frac{A-5\,iB}{3\, \left ( \tan \left ( fx+e \right ) +i \right ) ^{3}}}-{\frac{B}{2\, \left ( \tan \left ( fx+e \right ) +i \right ) ^{2}}}-{\frac{4\,iB-4\,A}{5\, \left ( \tan \left ( fx+e \right ) +i \right ) ^{5}}} \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: RuntimeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.27815, size = 181, normalized size = 1.48 \begin{align*} \frac{{\left (-6 i \, A - 6 \, B\right )} a^{3} e^{\left (10 i \, f x + 10 i \, e\right )} - 15 i \, A a^{3} e^{\left (8 i \, f x + 8 i \, e\right )} +{\left (-10 i \, A + 10 \, B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )}}{240 \, c^{5} f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.51532, size = 219, normalized size = 1.8 \begin{align*} \begin{cases} \frac{- 960 i A a^{3} c^{10} f^{2} e^{8 i e} e^{8 i f x} + \left (- 640 i A a^{3} c^{10} f^{2} e^{6 i e} + 640 B a^{3} c^{10} f^{2} e^{6 i e}\right ) e^{6 i f x} + \left (- 384 i A a^{3} c^{10} f^{2} e^{10 i e} - 384 B a^{3} c^{10} f^{2} e^{10 i e}\right ) e^{10 i f x}}{15360 c^{15} f^{3}} & \text{for}\: 15360 c^{15} f^{3} \neq 0 \\\frac{x \left (A a^{3} e^{10 i e} + 2 A a^{3} e^{8 i e} + A a^{3} e^{6 i e} - i B a^{3} e^{10 i e} + i B a^{3} e^{6 i e}\right )}{4 c^{5}} & \text{otherwise} \end{cases} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] time = 1.67002, size = 417, normalized size = 3.42 \begin{align*} -\frac{2 \,{\left (15 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{9} + 30 i \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{8} - 15 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{8} - 140 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{7} + 10 i \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{7} - 170 i \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{6} + 65 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{6} + 282 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} - 12 i \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{5} + 170 i \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 65 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{4} - 140 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} + 10 i \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{3} - 30 i \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 15 \, B a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )^{2} + 15 \, A a^{3} \tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right )\right )}}{15 \, c^{5} f{\left (\tan \left (\frac{1}{2} \, f x + \frac{1}{2} \, e\right ) + i\right )}^{10}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]